<template>
  <div class="information">
    <div class="banner">
      <h3>住建执业资格</h3>
      <p>住建行业个人从业资质证书查询及办理</p>
    </div>

    <div class="info-title">
      <h3>证书查询</h3>
    </div>


    <ul class="my-certificate border-bottom">
      <li>
        <router-link :to="`/list?papersnumber=${userdetail.papersnumber}&id=rySafety`">
          <span class="link">安全生产考核证书查询</span>
        </router-link>
      </li>
      <li>
        <router-link :to="`/list?papersnumber=${userdetail.papersnumber}&id=rySpecial`">
          <span class="link">特种证书查询</span>
        </router-link>
      </li>

      <li><router-link :to="`/list?papersnumber=${userdetail.papersnumber}&id=ryReg&type=RY_REG_0014`"> 二级注册建造师</router-link></li>
      <li><router-link :to="`/list?papersnumber=${userdetail.papersnumber}&id=ryReg&type=RY_REG_0002`"> 二级注册建筑师</router-link></li>
      <li><router-link :to="`/list?papersnumber=${userdetail.papersnumber}&id=ryReg&type=RY_REG_0004`"> 二级注册结构工程师</router-link></li>
      <li><router-link :to="`/list?papersnumber=${userdetail.papersnumber}&id=ryReg&type=RY_REG_0016`"> 二级临时建造师</router-link></li>

    </ul>



    <div class="info-title">
      <h3>业务办理</h3>
    </div>


    <ul class="my-certificate">
      <li>
        <router-link :to="`/listHandle?papersnumber=${userdetail.papersnumber}&id=safeDelay`">
          <span class="link">安全三类 延期</span>
        </router-link>
      </li>
      <li>
        <router-link :to="`/specialListHandle?papersnumber=${userdetail.papersnumber}&id=specialDelay`">
          <span class="link">特种证书 延期</span>
        </router-link>
      </li>


    </ul>



    <div v-if="false">
      <p>{{view.herf}}</p>
      <p>{{view.auth_token}}</p>
    </div>
    <div v-if="false" class="detail-banner">
      <div class="detail-person flex">
        <div class="detail-per-des">
          <h3 class="title3">姜子牙{{userdetail.name|isNull}}</h3>
          <p class="text">34040614580605003x{{userdetail.papersnumber|isNull}}</p>
        </div>
      </div>
    </div>
    <ul v-if="false" class="my-certificate">
      <li>
        <router-link :to="`/list?papersnumber=${userdetail.papersnumber}&id=rySafety`">
          <span class="link">安全生产考核证书查询</span>
        </router-link>
      </li>
      <li>
        <router-link :to="`/list?papersnumber=${userdetail.papersnumber}&id=rySpecial`">
          <span class="link">特种证书查询</span>
        </router-link>
      </li>
      <li>
        <a href="javascript:;">
          <span class="link">省管注册证书查询</span>
        </a>

        <dl class="er-list">
          <dd><router-link :to="`/list?papersnumber=${userdetail.papersnumber}&id=ryReg&type=RY_REG_0014`"> 二级注册建造师</router-link></dd>
          <dd><router-link :to="`/list?papersnumber=${userdetail.papersnumber}&id=ryReg&type=RY_REG_0002`"> 二级注册建筑师</router-link></dd>
          <dd><router-link :to="`/list?papersnumber=${userdetail.papersnumber}&id=ryReg&type=RY_REG_0004`"> 二级注册结构工程师</router-link></dd>
          <dd><router-link :to="`/list?papersnumber=${userdetail.papersnumber}&id=ryReg&type=RY_REG_0016`"> 二级临时建造师</router-link></dd>
        </dl>

      </li>
    </ul>

  </div>
</template>

<script>
  import { Toast ,Indicator } from 'mint-ui';
  import utils from "@/assets/js/utils";

  export default {
    name: "information",
    data() {
      return {
        view:{

        },
        userdetail: {}
      }
    },
    activated(){
      Indicator.close();
    },

    created() {
      //Indicator.open('加载中...');
      this.GetInfo(utils.GetRequest().auth_token);
      //this.GetInfo('78468c9cf36d501e369f21b2775b344d');
      //console.log(utils.GetRequest())

      this.view.herf = window.location;
      this.view.auth_token = utils.GetRequest().auth_token;

    },
    methods: {

      GetInfo: function (data) {
        let param = {
          ticket: data
        };
        this.$api.post('/jxtyyh/interfaces/jis/verifyTicket.do', {
          ticket: data
          //param : JSON.stringify(param)
        }, res => {
          console.log(res);
         // Indicator.close();
          if(res.result){
            this.userdetail = res.userdetail;
          }else {
            if(res.data.msg){
             // Toast(res.data.msg);
            }else {
            //  Toast('获取信息失败')
            }
          }
        });
      }
    }
  }
</script>

<style lang="less" scoped>

  .detail-banner{
    margin-bottom: .32rem;
  }

  .border-bottom{
    border-bottom: 0.15rem solid #f2f1f6;;
  }

</style>
